/*
 * @Author: your name
 * @Date: 2021-07-16 15:47:34
 * @LastEditTime: 2021-08-12 16:21:16
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \agcim-viewer\src\widgets\ViewPointManage\js\serverData.js
 */
var  axiosWraper = agcim.net.axiosWraper;
var  axios = agcim.net.http;
import qs from "qs"; // 根据需求是否导入qs模块

class ServerData {
  //获取json管理数据
  getJsonStore(params) {
    return axiosWraper.getData(
      agcim.net.apiPath.io_jsonstore_getByDomainAndUsage+"?"+params
    );
  }
  // 新增json管理数据
  saveJsonStore(params) {
    let promise = axios.post(
      agcim.net.apiPath.io_jsonstore_save,
      qs.stringify(params)
    );
    return promise;
  }
  //更新json管理数据
  updateJsonStore(params) {
    let promise = axios.post(
      agcim.net.apiPath.io_jsonstore_update,
      qs.stringify(params)
    );
    return promise;
  }
  //删除json管理数据
  deleteJsonStore(params) {
    let promise = axios.delete(
      agcim.net.apiPath.io_jsonstore_deleteById+params
    );
    return promise;
  }
}
let serverData = new ServerData();
export default serverData;
